import { JsonUtil } from "db://app-game/core/utils/JsonUtil";
import { DBJoysitickType } from "./DBJoysitick.type";

export class DBJoysitick {
  /** 表单名称 */
  static DBName = "Joysitick";
  /** 表单数据 */
  data: DBJoysitickType = null!;

  init(id: number) {
    let db = JsonUtil.get(DBJoysitick.DBName) as DBJoysitickType[];
    this.data = db.find((v) => v.id === id)!;
  }
}
